import React,{useEffect,useState} from 'react'
import  './index.less'
import type { ScFlipCardProps } from './type'
import FlipCard from './components/FlipCard'
const ScFlipCard:React.FC<ScFlipCardProps>=(props)=>{
    const {value,numbers}=props
    console.log(numbers)
    return <>
    <div className='sc-flip-wrap'>
        <div className='sc-flip-view'>
        {new Array(numbers).fill('').map((num,index)=>{
            return <FlipCard key={index} value={value?.toString()?.split('')[Number(index)]||'0'}/>
        })}
        </div>
    </div>  
    </>
}
export default ScFlipCard
